<div class="col-lg-12">
    <h1 class="page-header">Danh sách tài khoản admin</h1>
</div>
<div class="col-lg-12">
    <a href="<?php echo Yii::app()->createUrl('account/add')?>" class="btn btn-success margin-20">Thêm tài khoản mới >> </a>
    <table class="items table table-bordered">
        <tr style="background: #428bca;color: #fff">
            <th width="50">#</th>
            <th>tên tài khoản</th>
            <th>ngày tạo</th>
            <th>Sửa</th>
            <th>Xóa</th>
        </tr>
        
        
        <?php foreach($admins as $admin):?>
        <tr>
            <td><?php echo $admin->id?></td>
            <td><?php echo $admin->username;?></td>
            <td><?php echo date('d-m-Y',  strtotime($admin->created))?></td>
            <td>
                <a class="update" title="" data-toggle="tooltip" href="<?php echo Yii::app()->createUrl('account/update',array('id' => $admin->id))?>" data-original-title="Update">
                    <i class="glyphicon glyphicon-pencil"></i>
                </a>
            </td>
            <td>
                <a class="delete" title="" data-toggle="tooltip" href="<?php echo Yii::app()->createUrl('account/delete',array('id' => $admin->id))?>" data-original-title="Delete">
                    <i class="glyphicon glyphicon-trash"></i>
                </a>
                
            </td>
        </tr>
        <?php endforeach;?>
        
    </table>
</div>